<form class="form-inline" method="get">
    <div class="col-xs-12">
        <div class="form-group col-xs-2">
            <div class="col-xs-12">
                <input type="text" class="form-control" name="telephone" value="{$param.telephone|default=''}" placeholder="请输入手机号">
            </div>
        </div>
        <button type="submit" class="btn btn-success">
            搜索
        </button>
        <a href="{:url('System/smssendlog',['types'=>1])}" target='_blank' class="btn btn-danger">查看余额</a>
        <a href="{:url('System/smssendlog',['types'=>2])}" target='_blank' class="btn btn-danger" title='请求过于频繁号码'>被封号码</a>
    </div>
</form>



<form class="form-inline" method="get">
    <div class="col-xs-12">
        <div class="form-group col-xs-2">
            <div class="col-xs-12">
                <input type="text" class="form-control" name="sendtel" value="{$param.sendtel|default=''}" placeholder="接收手机号" />
            </div>
        </div>
        <button type="submit" class="btn btn-success" name='codebtn'>
          验证码测试
        </button>
        <button type="submit" class="btn btn-success" name='sucbtn'>
          交易短信测试
        </button>
    </div>
</form>



<hr>
<table class="table table-striped table-bordered">
    <thead>
    <tr>
        <td>ID</td>
        <td>手机号</td>
        <td>短信模板</td>
        <td>发送状态</td>
        <td>发送时间</td>
        <td>过期时间</td>
        <td>异常信息</td>
    </tr>
    </thead>
    <tbody>
    {volist name="list" id="item"}
    <tr>
        <td>{$item.id}</td>
        <td>
            {$item.telephone}
        </td>
        <td>
          {if $item.type == 4}
            订单提醒
          {else}
            验证码
          {/if}
        </td>
        <td>
            {if $item["status"] eq 0 || $item["status"] eq -1}
            <label class="label label-danger">发送失败</label>
            {else}
            <label class="label label-success">发送成功
                {if $item['status'] eq 1}
                    未使用
                {elseif $item['status'] eq 2}
                    已使用
                {elseif $item['status'] eq 3}
                    已过期
                {/if}
            </label>
            {/if}
        </td>
        <td>
            {:date("Y-m-d H:i:s", $item.create_time)}
        </td>
        <td>
            {:date("Y-m-d H:i:s", $item.exp_time)}
        </td>
        <td>
            {$item.remarks|default='无'}
        </td>
    </tr>
    {/volist}
    </tbody>
</table>

<div class="row">
    <div class="col-xs-12" style="text-align: right;">
        {$list->render()}
    </div>
</div>
<script src="__PUBLIC__/vendors/select2/js/select2.min.js"></script>
<script type="application/javascript">
    $(function () {
        $("#cate").select2({
            placeholder: "选择分类",
            allowClear: true
        });
    })
</script>
